﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CCF20Model.FaultHandler
{
    public class CompleteFaultHandler : FaultHandlerBase, IFaultHandler
    {
        public CompleteFaultHandler(IFaultHandler handler)
        {
            this.PreviousHandler = handler;
            this.MyFault = handler.MyFault;
            this.MyVehicle = handler.MyVehicle;
            this.ccf20Ent = handler.ccf20Ent;
        }
        public override void ProcessRequest()
        {
            ccf20Ent.Faults.AddObject(MyFault);
            ccf20Ent.SaveChanges();
            LogEnd();
        }
        

    }
}
